package com.example.base.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @TableName accounts
 */
@Data
@NoArgsConstructor
@AllArgsConstructor(staticName = "of")
@Builder
@TableName(value = "accounts", autoResultMap = true)
public class Account implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;

    private String name;

    private Integer amount;
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> role;

}
